DR

[Resolvido] Visualização de quests

Por DrewMarques, 13 de jun. de 2017 em Resolvidos

modern aac
pokemon
derivado
9
1.9k
DrewMarquesD
13 de junho de 2017 às 15:42

Ola Galera tou precisando de uma ajudinha aki no meu mordem acc  minha aba de quest fica assim

Spoiler

Screenshot_17.png.66311e664c463aa07e5a99facc12b0cc.png

 

Eu queria Deixar assim

Spoiler

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

 

alguem pode me ajudar?

 

Minha injections.php

 

Spoiler

<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$characterPageQuests = array();
/* A list of quests for character/view page. It will be listed on the page as a table to show acomplished missions.
Array contains array of quests which includes STORAGE ID, STORAGE VALUE (Required to finish quest) and NAME 
To create new quest copy line accross and change values.*/


$player = $GLOBALS['player'];
/* Eg. $characterPageQuests[] = array('storage'=>5000, 'value'=>1, 'name'=>'Demon Helmet Quest'); */

$characterPageQuests[] = array('storage'=>31441546, 'value'=>1, 'name'=>'First');
$characterPageQuests[] = array('storage'=>2353462, 'value'=>1, 'name'=>'Dark');
$characterPageQuests[] = array('storage'=>2353463, 'value'=>1, 'name'=>'Earth');
$characterPageQuests[] = array('storage'=>32542354, 'value'=>1, 'name'=>'Punch');
$characterPageQuests[] = array('storage'=>2353464, 'value'=>1, 'name'=>'Rock');
$characterPageQuests[] = array('storage'=>2353465, 'value'=>1, 'name'=>'Venom');
$characterPageQuests[] = array('storage'=>20112015, 'value'=>1, 'name'=>'Crystal');
$characterPageQuests[] = array('storage'=>2353466, 'value'=>1, 'name'=>'Boost Ice');
$characterPageQuests[] = array('storage'=>2353468, 'value'=>1, 'name'=>'Boost Free');
$characterPageQuests[] = array('storage'=>2353467, 'value'=>1, 'name'=>'Boost hell');
$characterPageQuests[] = array('storage'=>20112016, 'value'=>1, 'name'=>'Celebi');
$characterPageQuests[] = array('storage'=>2436754423, 'value'=>1, 'name'=>'Halloween');
$characterPageQuests[] = array('storage'=>243654651, 'value'=>1, 'name'=>'Shedinja');
$characterPageQuests[] = array('storage'=>90030, 'value'=>1, 'name'=>'Burned');
$characterPageQuests[] = array('storage'=>88185428, 'value'=>1, 'name'=>'Unown');
$characterPageQuests[] = array('storage'=>243243, 'value'=>1, 'name'=>'Rayquaza');
$characterPageQuests[] = array('storage'=>978524350, 'value'=>1, 'name'=>'Ultra ball');
$characterPageQuests[] = array('storage'=>20112027, 'value'=>1, 'name'=>'Lugia');
$characterPageQuests[] = array('storage'=>20112020, 'value'=>1, 'name'=>'Dragons Den');
$characterPageQuests[] = array('storage'=>314143, 'value'=>1, 'name'=>'Milotic');
$characterPageQuests[] = array('storage'=>550982398, 'value'=>1, 'name'=>'Farol');
$characterPageQuests[] = array('storage'=>95148455, 'value'=>1, 'name'=>'Conquest');
$characterPageQuests[] = array('storage'=>181656, 'value'=>1, 'name'=>'Policial Jenny');
$characterPageQuests[] = array('storage'=>243654649, 'value'=>1, 'name'=>'Pesadelo');
$characterPageQuests[] = array('storage'=>314150, 'value'=>1, 'name'=>'Mysterious');
$characterPageQuests[] = array('storage'=>20112018, 'value'=>1, 'name'=>'Specilist');
$characterPageQuests[] = array('storage'=>44457427, 'value'=>1, 'name'=>'Remembrance');

 if(count($characterPageQuests) != 0) {
        echo "<div class='bar'>Quests</div>";
    
        echo "<table width='100%'>";
        echo "<tr><td width='90%'><center><b>Nome da Quest/status/level</b></center></td><td><b><center>Status</center></b></td></tr>";
        $SQL = POT::getInstance()->getDBHandle();
        foreach($characterPageQuests as $value) {
            $quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();
            $status = ($quest) ? "true" : "false";
            echo "<tr><td width='90%'><center>".$value['name']."</center></td><td><center><img src='../../../public/images/$status.gif'></center></td></tr>";
        }
        echo "</table>";
    }
?>

 

alguem

Screenshot_17.png.66311e664c463aa07e5a99facc12b0cc.png

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

Editado Junho 14 por Frenvius

MarshmelloM
13 de junho de 2017 às 22:05

meu tmbn e assim dps vou tentar fazer isso aki pois n sou mt bom com website n sei mais talvez o @Bennyyw possa te ajudar n sei

DrewMarquesD
13 de junho de 2017 às 22:56
41 minutos atrás, Marshmello disse:

meu tmbn e assim dps vou tentar fazer isso aki pois n sou mt bom com website n sei mais talvez o @Bennyyw possa te ajudar n sei

Sera q ele vai poder me ajudar nisso, @Bennyyw

DrewMarquesD
14 de junho de 2017 às 08:42

alguem ajuda pf ;;-;;

MarshmelloM
14 de junho de 2017 às 20:11
11 horas atrás, DrewMarques disse:

alguem ajuda pf ;;-;;

Não Encontrou ngm ainda? Ver se o adm do forum te ajuda ele tmbn mexe com mordem eu acho @Frenvius

FrenviusF
14 de junho de 2017 às 20:18

me add no skype, eu te ajudo a resolver, resolvendo eu posto a solução aqui

meu skype é Frenvius

DrewMarquesD
14 de junho de 2017 às 21:14
47 minutos atrás, Frenvius disse:

me add no skype, eu te ajudo a resolver, resolvendo eu posto a solução aqui

meu skype é Frenvius

Ja mandei cvt

FrenviusF
14 de junho de 2017 às 22:14
Melhor resposta

Solução:

 

Abra o injections.php do caminho injections\character_view\quests

 

Substitua isso:

if(count($characterPageQuests) != 0) {        echo "<div class='bar'>Quests</div>";            echo "<table width='100%'>";        echo "<tr><td width='90%'><center><b>Nome da Quest/status/level</b></center></td><td><b><center>Status</center></b></td></tr>";        $SQL = POTgetInstance()->getDBHandle();        foreach($characterPageQuests as $value) {            $quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();            $status = ($quest) ? "true" : "false";            echo "<tr><td width='90%'><center>".$value['name']."</center></td><td><center><img src='../../../public/images/$status.gif'></center></td></tr>";        }        echo "</table>";    }

Por isso:

if(count($characterPageQuests) != 0) {	 echo "<div class='bar'>Quests</div><br>";		echo "<div width='100%' class='quest_viwer'>";		//echo "<tr><td width='90%'><b>Nome da Quest</b></td><td><b>Status</b></td></tr>";		$SQL = POTgetInstance()->getDBHandle();		foreach($characterPageQuests as $value) {			$quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();			$status = ($quest) ? "true" : "false";			echo "<div class='quest $status'><center><img width='20%' src='../../../public/images/$status.gif'><br>".$value['name']."</center></div>";		}		echo "</div>";	}

 

Feito isso, adicione o código abaixo no final do arquivo system.css na pasta public\css:

.quest_viwer > .quest {	width: 75px;	height: 50px;	padding: 10px;	display: inline-block;}.quest.true {	color: rgb(0, 128, 0);}.quest.false {	color: rgb(255, 0, 0);}

 

Pronto a visualização ficará da forma como na imagem abaixo

 

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

FrenviusF
14 de junho de 2017 às 22:19

A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.